Skip to content

Conversation

SaxonF
Copy link

@SaxonF SaxonF commented Jul 28, 2025

This adds commands for downloading and pushing "snippets" to remote (dashboard). As part of database testing work, a snippet can either by "sql" (e.g. in sql editor) or "tests". A test is an sql file that makes use of pgTap. https://supabase.com/docs/guides/database/testing

tests download downloads project snippets of type test to the tests/database folder.

snippets download downloads project snippets of type sql to the snippets folder.

Infrastructure PR https://github.com/supabase/infrastructure/pull/24519

Studio PR supabase/supabase#37499

"favorite": false,
"schema_version": schemaVersion,
"sql": sql,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix the openapi type so this can be a properly generated struct.

I'd also use multipart/form upload for sql snippets to avoid string escape issues when converting sql function to json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants